package com.l.demo.model;

import lombok.Data;

@Data
public class ReqResult {
    private int code;
    private String msg;
    private Object data;

    public static ReqResult success(Object data) {
        ReqResult result = new ReqResult();
        result.setCode(200);
        result.setData(data);
        return result;
    }

    public static ReqResult fail(String msg) {
        ReqResult result = new ReqResult();
        result.setCode(500);
        result.setMsg(msg);
        return result;
    }
}
